package com.example.day05.homework;

import java.util.Date;

public class BasedPlusSalesEmployee extends  SalesEmployee{

  private  double  salarys;

    public BasedPlusSalesEmployee(String name, Date birthday, double count, double probability, double salarys) {
        super(name, birthday, count, probability);
        this.salarys = salarys;
    }

    public double getSalarys() {
        return salarys;
    }

    public void setSalarys(double salarys) {
        this.salarys = salarys;
    }

    @Override
    public double getSalary(int month) {
        return super.getSalary(month)+this.getSalarys();
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("BasedPlusSalesEmployee{");
        super.toString();
        sb.append("salarys=").append(salarys);
        sb.append('}');
        return sb.toString();
    }
}
